<?php

function printNews($user_description, $user_job, $user_email, $user_name, $user_surname, $user_login, $id_user, $type_img) {

    switch ($type_img) {
        case 0 :
            $ext = 'png';
            break;
        case 1 :
            $ext = 'jpg';
            break;
        case 2 :
            $ext = 'jpeg';
            break;
        default :
            $ext = '';
            break;
    }

    echo'<div class="template_box_profile">';
    echo '
        <span class="template_description">
        <img class="template_img_admin" src="' . URL_IMG . '/profiles/' . $id_user . '.' . $ext . '" alt="Voir le profil de ' . $user_surname . ' ' . $user_name . '" />
        </span>';

    echo '    
              </span>
              
              
              <span class="template_right">
                <span class="template_span">Prenom: <input class="template_input" type="text" name="user_name' . $id_user . '" value= "' . $user_surname . '"></span>
                <span class="template_span">Nom: <input class="template_input" type="text" name="user_surname' . $id_user . '" value= "' . $user_name . '"></span>
                <span class="template_span">Login:  <input class="template_input" type="text" name="user_login' . $id_user . '" value= "' . $user_login . '"></span>
                <span class="template_span">Job:  <input class="template_input_long" type="text" name="user_job' . $id_user . '" value= "' . $user_job . '"></span>   
                <span class="template_span">Adresse Mail:  <input class="template_input" type="text" name="user_email' . $id_user . '" value= "' . $user_email . '"></span>   
                <span class="template_span">Description:  <textarea id = "visu' . $id_user . '" cols="50" rows="10" type="text" name="user_description' . $id_user . '">' . $user_description . '</textarea></span>                            
                <input type="file" name="photo' . $id_user . '" >
                <input class="button" type="button" value="valider"  onClick= "envoi_form(' . $id_user . ');" ></br>
                <input class="button" type="button" value="Supprimer l\'admin"  onClick= "envoi_form_delete(' . $id_user . ');" >

              </span>
              
            
        </div>
        
';
}

function start_form() {

    echo '<form action="' . URL_ROOT . 'update-admin" method="post" name="form2" id="form2" enctype="multipart/form-data">
';
}

//   echo '<div class="send_form"><form action="'.URL_ROOT.'update-new/form-1-new_id-'.$news_id.'" method="post"  enctype="multipart/form-data">




function end_button() {

    echo'<button onClick="ClicBouton()"> Cliquez moi !</button> 
';
}

function end_form() {


}

?>
